<template>
	<view class="container">
		<view class="card" v-for="(item,index) in revenueRecordList">
			<view class="listStyle">
				<view class="listKey"> 订单号: {{item.orderno}}</view>
				<view
					:class="[item.status=='已处理'? 'successState':item.status=='未处理'?'actionState':'failState','listValue']">
					{{item.status}}
				</view>
			</view>
			<view class="listStyle">
				<view class="listKey">收款人：</view>
				<view class="listValue">{{item.name}}</view>
			</view>
			<!-- <view class="listStyle">
				<view class="listKey">{{item.account_bank}}：</view>
				<view class="listValue">{{item.account}}</view>
			</view> -->
			<view class="listStyle">
				<view class="listKey">提现金额：</view>
				<view class="listValue priceStyle">¥ {{item.money}}</view>
			</view>
			<view class="listStyle">
				<view class="listKey">申请时间：</view>
				<view class="listValue">{{item.addtime}}</view>
			</view>
			<!-- 操作盒子 -->
			<view class="opearBox" v-if="item.status!='未处理'">
				<view class="listStyle" v-if="item.status=='已处理'">
					<view class="listKey">交易流水号：</view>
					<view class="listValue">{{item.trade_no}}</view>
				</view>
				<view class="listStyle">
					<view class="listKey">处理时间：</view>
					<view class="listValue">{{item.uptime}}</view>
				</view>
			</view>
		</view>
		<view class="tipsWrapper" v-if="revenueRecordList.length<=0">...... 找不到更多提现记录了 ......</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				revenueRecordList: [],
				type:null
			}
		},
		onLoad(opt) {
			this.type=opt.type
		},
		onShow() {
			this.getRecordList()
		},
		methods: {
			async getRecordList() {
				const {
					data
				} = await this.$http('/appapi/play_with/withdrawalLog', {
					type: this.type,
				});
				this.revenueRecordList = data
			}
		}
	}
</script>

<style lang="less" scoped>
	.opearBox {
		border-top: 1px solid #c3bebe;
		margin: 20rpx 0;
		padding: 20rpx 0;
	}
	.priceStyle{
		font-size: 38rpx;
		font-weight: 600;
	}
	.listStyle {
		display: flex;
		justify-content: space-between;
	}
	.listkey {
		color: #A3A5AE;
	}
	.listValue {
		color: #898385;
	}
	.card {
		width: 95%;
		background-color: #ffffff;
		margin: 50rpx auto 0;
		padding: 25rpx 20rpx 15rpx;
		box-sizing: border-box;
		border-radius: 20rpx;
		font-size: 26rpx;
		view{
			margin: 10rpx 0;
		}
	}

	.tipsWrapper {
		font-size: 25rpx;
		color: #8E9897;
		text-align: center;
		padding: 50rpx;
	}

	.container {
		background-color: #e7e7e7;
		min-height: 100vh;
		box-sizing: border-box;
		padding-top: 5px;
		padding-bottom: 20rpx;
	}

	.successState {
		color: #66D9C0;
	}

	.actionState {
		color: #9B9B9B;
	}

	.failState {
		color: #C90000;
	}

	.specialItem {
		background-color: #d5d5d5;
	}
</style>